/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 容器布局 */
.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 220px;
    background-color: #2c3e50;
    padding: 20px 0;
}

.sidebar-item {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 12px 25px;
    transition: all 0.3s ease;
}

.sidebar-item:hover {
    background-color: #34495e;
    padding-left: 30px;
}

.sidebar-item.active {
    background-color: #3498db;
    border-left: 4px solid #2980b9;
}

/* 主内容区域 */
.content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e4e8;
}

.header h1 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

/* 搜索筛选区域 */
.search-area {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.search-area select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 180px;
}

.search-area button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-area button:hover {
    background-color: #2980b9;
}

/* 统计卡片样式 */
.stats-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
}

.sales-color {
    color: #007bff;
}

.orders-color {
    color: #28a745;
}

.avg-color {
    color: #dc3545;
}

/* 图表容器样式 */
.charts-container {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    height: 300px;
}

.chart-wrapper {
    flex: 1;
    height: 100%;
}

.chart {
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 10px;
}

/* 表格样式 */
.table-container {
    background-color: white;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 20px;
}

.table-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .charts-container {
        flex-direction: column;
        height: auto;
        gap: 30px;
    }

    .chart-wrapper {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        flex-direction: column;
    }

    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
    }

    .sidebar-item {
        white-space: nowrap;
    }
}